import request from "@/request/request";
import qs from "qs"

/**
 * 加载反馈信息列表
 * @param data
 * @returns {Promise<AxiosResponse<any>>}
 */
export function getEvaluateList(data){
    let url = "/admin/feedback";
    console.log("data："+qs.stringify(data))
    if(data){
        url += "?"+qs.stringify(data);
    }
    let param = {
        url:url,
        method:"GET"
    }
    return request(param);
}

export function getEvaluateDetail(data){
    let url = "";
    if(data){
        url = "/admin/feedback/"+data;
    }
    let param = {
        url:url,
        method:"GET"
    }
    return request(param);
}


export function saveResponse(data){
    let url = "/admin/feedback";
    console.log("saveResponse"+qs.stringify(data))
    let param = {
        url:url,
        method:"put",
        data: qs.stringify(data)
    }
    return request(param);
}


getDelete
export function getDelete(data){
    let url = "/admin/feedback/"+data;
    console.log("getDelete:"+data)
    let param = {
        url:url,
        method:"delete",
    }
    return request(param);
}
